package cn.tedu.egmvc1.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class EmpController {
    @RequestMapping("/emp/add")
    @ResponseBody
    public String addEmployee(String  name,double salary,String  job)
    {
        System.out.println("员工姓名："+name+"，员工薪资："+salary+"，员工职位："+job);
        return "添加成功";
    }
    @RequestMapping("/emp/list")
    @ResponseBody
    public String getEmployeeList()
    {
        System.out.println("查询成功");
        return "查询成功";
    }
    @RequestMapping("/emp/update")
    @ResponseBody
    public String updateEmployee(int id,String  name,double salary,String  job)
    {
        System.out.println("员工编号："+id+"，员工姓名："+name+"，员工薪资："+salary+"，员工职位："+job);
        return "修改成功";
    }
    @RequestMapping("/emp/delete")
    @ResponseBody
    public String deleteEmployee(int id){
        System.out.println("删除成功员工编号："+id);
        return "删除成功";
    }
}
